[PATCH] restore setting unroll-threshold on LLVM 9
authorAndreas Beckmann <anbe@debian.org>
Wed, 27 Jan 2021 20:26:51 +0000 (21:26 +0100)
committerAndreas Beckmann <anbe@debian.org>
Thu, 30 Sep 2021 16:07:33 +0000 (17:07 +0100)
otherwise kernel/test_rotate hangs on avx512 capable cpus

(this partially reverts 459d0bb5241a62af3b5b607a65dcf5e9a34a01ee)

Gbp-Pq: Name 2003-restore-setting-unroll-threshold-on-LLVM-9.patch

lib/CL/pocl_llvm_utils.cc

index b48cc78da03d50133691a3379b94c33a942533ff..d1f3aecc979b67b1c53306f00a180add0e8c53b2 100644 (file)
@@ -362,6 +362,12 @@ void InitializeLLVM() {
     O->addOccurrence(1, StringRef("debug"), StringRef("true"), false);
   }
 
+#if LLVM_MAJOR == 9
+  O = opts["unroll-threshold"];
+  assert(O && "could not find LLVM option 'unroll-threshold'");
+  O->addOccurrence(1, StringRef("unroll-threshold"), StringRef("1"), false);
+#endif
+
   LLVMInitialized = true;
 }